import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/order_detail_entity.dart';

OrderDetailEntity $OrderDetailEntityFromJson(Map<String, dynamic> json) {
  final OrderDetailEntity shipperEntity = OrderDetailEntity();

  final String? orderNumber = jsonConvert.convert<String>(json['orderNumber']);
  if (orderNumber != null) {
    shipperEntity.orderNumber = orderNumber;
  }

  final String? addressDetail = jsonConvert.convert<String>(json['addressDetail']);
  if (addressDetail != null) {
    shipperEntity.addressDetail = addressDetail;
  }

  final String? mobilePhone = jsonConvert.convert<String>(json['mobilePhone']);
  if (mobilePhone != null) {
    shipperEntity.mobilePhone = mobilePhone;
  }

  final String? stationTime = jsonConvert.convert<String>(json['stationTime']);
  if (stationTime != null) {
    shipperEntity.stationTime = stationTime;
  }

  final String? consignee = jsonConvert.convert<String>(json['consignee']);
  if (consignee != null) {
    shipperEntity.consignee = consignee;
  }

  shipperEntity.orderGoodsResList = jsonConvert.convertList(json['orderGoodsResList']);

  return shipperEntity;
}

Map<String, dynamic> $OrderDetailEntityToJson(OrderDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['orderNumber'] = entity.orderNumber;
  data['addressDetail'] = entity.addressDetail;
  data['mobilePhone'] = entity.mobilePhone;
  data['stationTime'] = entity.stationTime;
  data['consignee'] = entity.consignee;
  data['orderGoodsResList'] = entity.orderGoodsResList;
  return data;
}
